package com.accenture.adf.newcodington.module10.sample;

/**
 * Topic: Inheritance
 * 
 * Instructions:
 * 
 * 	The Rectangle class is to be created and updated in the participant folder by 
 * 	the faculty during the See It tasks for the module.
 *
 */
public class Rectangle implements Shape {

	private double length;
	private double breadth;

	
	//parameterized constructor of the class
	public Rectangle(double length, double breadth) {
		this.length = length;
		this.breadth = breadth;
	}

	
	/**
	 * @return the length
	 */
	public double getLength() {
		return length;
	}


	/**
	 * @param length the length to set
	 */
	public void setLength(double length) {
		this.length = length;
	}


	/**
	 * @return the breadth
	 */
	public double getBreadth() {
		return breadth;
	}


	/**
	 * @param breadth the breadth to set
	 */
	public void setBreadth(double breadth) {
		this.breadth = breadth;
	}


	@Override
	public double calculateArea() {
		
		return length*breadth;
	}

	@Override
	public double calculatePerimeter() {
		
		return 2 * (length + breadth);
	}

}
